package com.hyf.snackbartoast;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.hyf.snackbartoast.widget.SnackToast;
import com.hyf.snackbartoast.widget.SnackTopToast;

public class SnackActivity extends AppCompatActivity {

    private SnackToast mSnackToast;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_snack);
        findViewById(R.id.btn_show).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new SnackTopToast(getApplicationContext(), false)
                        .setIconRes(R.drawable.ic_error_outline_black_24dp)
                        .setTitle("这是一条测试的标题")
                        .show();
            }
        });
    }
}
